import React from 'react';
import Bundle from './DynamicRoute';
import SubTcdList from 'bundle-loader?lazy!../pages/tcd/TcdList';
import Deal from 'bundle-loader?lazy!../pages/tcd/Deal';
import TcdList from "bundle-loader?lazy!../pages/tcd/TcdList";
import View from "bundle-loader?lazy!../pages/overview/View";
import Home from "bundle-loader?lazy!../pages/home/Home";
import Students from "bundle-loader?lazy!../pages/admin/Students";
import Stuents from "bundle-loader?lazy!../pages/admin/Stuents";
import Teacher from "bundle-loader?lazy!../pages/admin/TeacherList";
import User from "bundle-loader?lazy!../pages/admin/User";
import File from "bundle-loader?lazy!../pages/admin/FileList";
import Login from "bundle-loader?lazy!../pages/admin/Login";
import AdminMenu from "bundle-loader?lazy!../pages/admin/frame/Sider";
import addJob from "bundle-loader?lazy!../pages/overview/JobAdd";
import addMsg from "bundle-loader?lazy!../pages/overview/MessageAdd";
import addStuents from "bundle-loader?lazy!../pages/overview/StuentsAdd";
import addStudent from "bundle-loader?lazy!../pages/overview/StudentAdd";
import forget from "bundle-loader?lazy!../pages/admin/Forget";
import messageList from "bundle-loader?lazy!../pages/admin/Message";
import jobList from "bundle-loader?lazy!../pages/admin/JobList";
import noticeList from "bundle-loader?lazy!../pages/admin/NoticeList";
import noticeAdd from "bundle-loader?lazy!../pages/admin/NoticeAdd";
import menu from "bundle-loader?lazy!../pages/admin/frame/index";
import JianJie from "bundle-loader?lazy!../pages/admin/frame/content";

import Content from "bundle-loader?lazy!../pages/admin/frame/index";


const BundleCom = (props, loader) => {
    return (
        <Bundle load={loader}>
            {(Com) => <Com {...props}/>}
        </Bundle>
    )
}

export const commontLimtRouter = [
    {
        path: '/',
        exact: true,
        component: (props) => BundleCom(props, Home),
    },
   {
        path: '/TcdList',
        exact: true,
        component: (props) => BundleCom(props, TcdList),
    },
    {
        path: '/SubTcdList',
        exact: true,
        component: (props) => BundleCom(props, SubTcdList),
    },
    {
        path: '/Deal',
        exact: true,
        component: (props) => BundleCom(props, Deal),
    },
    {
        path: '/view*',
        exact: true,
        component: (props) => BundleCom(props, View),
    },
    {
        path: '/admin*',
        exact: true,
        component: (props) => BundleCom(props, menu),
    },
    {
        path: '/StudentsList',
        exact: true,
        component: (props) => BundleCom(props, Students),
    },
    {
        path: '/StuentsList',
        exact: true,
        component: (props) => BundleCom(props, Stuents),
    },
    {
        path: '/UserList',
        exact: true,
        component: (props) => BundleCom(props, User),
    },
    {
        path: '/teacherList',
        exact: true,
        component: (props) => BundleCom(props, Teacher),
    },
    {
        path: '/FileList',
        exact: true,
        component: (props) => BundleCom(props, File),
    },
    {
        path: '/login',
        exact: true,
        component: (props) => BundleCom(props, Login),
    },
    {
        path: '/ad',
        exact: true,
        component: (props) => BundleCom(props, AdminMenu),
    },
    {
        path: '/addJob',
        exact: true,
        component: (props) => BundleCom(props, addJob),
    },
    {
        path: '/addMsg',
        exact: true,
        component: (props) => BundleCom(props, addMsg),
    },
    {
        path: '/addStuents',
        exact: true,
        component: (props) => BundleCom(props, addStuents),
    },
    {
        path: '/addStudent',
        exact: true,
        component: (props) => BundleCom(props, addStudent),
    },
    {
        path: '/forget',
        exact: true,
        component: (props) => BundleCom(props, forget),
    },
    {
        path: '/message',
        exact: true,
        component: (props) => BundleCom(props, messageList),
    },
    {
        path: '/job',
        exact: true,
        component: (props) => BundleCom(props, jobList),
    },
    {
        path: '/noticeList',
        exact: true,
        component: (props) => BundleCom(props, noticeList),
    },
    {
        path: '/noticeAdd',
        exact: true,
        component: (props) => BundleCom(props, noticeAdd),
    },
    {
        path: '/menu',
        exact: true,
        component: (props) => BundleCom(props, menu),
    },
]
